package com.joker.demo.core.domain.dto;

import com.joker.demo.core.domain.enums.JobRunStatusEnum;

import java.io.Serializable;
import java.util.Date;

/**
 * 任务执行响应PO
 *
 * @author : feixiang.li
 * @since : 2025-07-24 16:57
 */
public class TaskExecuteResponseDTO implements Serializable {

    /**
     * 任务ID
     */
    private Long jobId;


    /**
     * 任务记录id
     * 需要更新状态的任务记录
     */
    private Long jobLogId;

    /**
     * 注册key
     */
    private String registerKey;

    /**
     * 地址
     */
    private String ip;

    /**
     * 任务名称
     */
    private String jobName;

    /**
     * 是否成功
     * {@link JobRunStatusEnum}
     */
    private Integer status;

    /**
     * 执行结果
     */
    private String result;

    /**
     * 错误信息
     */
    private String errorMsg;



    /**
     * 任务结束时间
     */
    private Date endTime;

    /**
     * 任务开始时间
     */
    private Date startTime;


    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Long getJobId() {
        return jobId;
    }

    public void setJobId(Long jobId) {
        this.jobId = jobId;
    }

    public Long getJobLogId() {
        return jobLogId;
    }

    public void setJobLogId(Long jobLogId) {
        this.jobLogId = jobLogId;
    }

    public String getRegisterKey() {
        return registerKey;
    }

    public void setRegisterKey(String registerKey) {
        this.registerKey = registerKey;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    @Override
    public String toString() {
        return "TaskExecuteResponseDTO{" +
                "jobId='" + jobId + '\'' +
                ", jobLogId=" + jobLogId +
                ", registerKey='" + registerKey + '\'' +
                ", ip='" + ip + '\'' +
                ", jobName='" + jobName + '\'' +
                ", status=" + status +
                ", result='" + result + '\'' +
                ", errorMsg='" + errorMsg + '\'' +
                '}';
    }
}